@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600&display=swap');

* {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
  border: none;
  text-decoration: none;
  text-transform: capitalize;
  transition: .2s linear;
}

$green: #bac34e;
$black: #222;
$white: #fff;
$light-color: #666;
$light-bg: #f3f3f3;
$border: .1rem solid rgba(0, 0, 0, .1);
$box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1);

@mixin grid($val) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax($val, 1fr));
  gap: 1.5rem;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

section {
  padding: 3rem 9%;
}

.heading {
  background: url(../image/heading-bg.jpg) no-repeat;
  background-size: cover;
  background-position: center;
  text-align: center;
  padding-top: 12rem;
  padding-bottom: 8rem;

  h1 {
    color: $black;
    font-size: 4rem;
  }

  p {
    padding-top: 1rem;
    font-size: 2rem;
    color: $light-color;

    a {
      color: $black;
      padding-right: .5rem;

      &:hover {
        color: $green;
      }
    }
  }
}

.title {
  display: flex;
  align-items: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  padding: 1.2rem 0;
  border-bottom: $border;
  color: $black;

  span {
    color: $green;
    padding-left: .7rem;
  }

  a {
    margin-left: auto;
    color: $light-color;
    font-size: 1.5rem;

    &:hover {
      color: $green;
    }
  }
}

.btn {
  margin-top: 1rem;
  display: inline-block;
  padding: .8rem 3rem;
  background: $green;
  color: $white;
  font-size: 1.7rem;
  cursor: pointer;

  &:hover {
    background: $black;
  }
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: $white;
  box-shadow: $box-shadow;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 9%;

  .logo {
    font-size: 2.5rem;
    font-weight: bolder;
    color: $black;

    i {
      color: $green;
      padding-right: .5rem;
    }
  }

  .navbar {

    a {
      font-size: 1.7rem;
      color: $light-color;
      margin: 0 1rem;

      &:hover {
        color: $green;
      }
    }
  }

  .icons div {
    font-size: 2.5rem;
    margin-left: 1.7rem;
    cursor: pointer;
    color: $light-color;

    &:hover {
      color: $green;
    }
  }

  .search-form {
    position: absolute;
    top: -115%;
    right: 2rem;
    width: 50rem;
    border-radius: .5rem;
    display: flex;
    align-items: center;
    height: 5.5rem;
    box-shadow: $box-shadow;
    background: $white;

    &.active {
      top: 115%;
    }

    input {
      height: 100%;
      width: 100%;
      padding: 0 1.2rem;
      font-size: 1.6rem;
      color: $black;
      text-transform: none;
    }

    label {
      font-size: 2.5rem;
      margin-right: 1.7rem;
      cursor: pointer;
      color: $light-color;

      &:hover {
        color: $green;
      }
    }
  }

  .shopping-cart {
    position: absolute;
    top: 115%;
    right: -105%;
    background: $white;
    border-radius: .5rem;
    box-shadow: $box-shadow;
    width: 35rem;
    padding: 2rem;

    &.active {
      right: 2rem;
      transition: .4s linear;
    }

    .box {
      display: flex;
      align-items: center;
      gap: 1.5rem;
      margin-bottom: 1.5rem;
      position: relative;

      .fa-times {
        position: absolute;
        top: 50%;
        right: 2rem;
        transform: translateY(-50%);
        font-size: 2rem;
        color: $light-color;
        cursor: pointer;

        &:hover {
          color: $green;
        }
      }

      img {
        height: 10rem;
      }

      .content {

        h3 {
          font-size: 1.7rem;
          padding-bottom: .5rem;
          color: $black;
        }

        span {
          font-size: 1.5rem;
          color: $light-color;

          &.multiply {
            margin: 0 .5rem;
          }
        }
      }
    }

    .total {
      color: $light-color;
      text-align: center;
      font-size: 2.2rem;

      span {
        color: $black;
      }
    }

    .btn {
      text-align: center;
      width: 100%;
    }
  }

  .login-form {
    position: absolute;
    top: 115%;
    right: -105%;
    background: $white;
    border-radius: .5rem;
    box-shadow: $box-shadow;
    width: 35rem;
    padding: 2rem;

    &.active {
      right: 2rem;
      transition: .4s linear;
    }

    h3 {
      color: $black;
      text-transform: uppercase;
      font-size: 2.2rem;
      text-align: center;
      margin-bottom: .7rem;
    }

    .box {
      margin: .7rem 0;
      border: $border;
      padding: 1rem 1.2rem;
      font-size: 1.5rem;
      color: $black;
      text-transform: none;
      width: 100%;
    }

    .remember {
      display: flex;
      align-items: center;
      gap: .5rem;
      margin: .7rem 0;

      label {
        font-size: 1.5rem;
        color: $light-color;
        cursor: pointer;
      }
    }

    .btn {
      margin: 1rem 0;
      width: 100%;
      text-align: center;
    }

    p {
      color: $light-color;
      padding-top: .7rem;
      font-size: 1.4rem;

      a {
        color: $green;

        &:hover {
          text-decoration: underline;
        }
      }
    }
  }
}

#menu-btn {
  display: none;
}

@keyframes fadeLeft {
  0% {
    transform: translateX(-5rem);
    opacity: 0;
  }
}

@keyframes fadeUp {
  0% {
    transform: scale(.5);
    opacity: 0;
  }
}

.home {
  padding-top: 14rem;
  background: url(../image/home-bg.jpg) no-repeat;
  background-size: cover;
  background-position: center;
  position: relative;

  .slides-container {

    .slide {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 1.5rem;
      display: none;

      &.active {
        display: flex;
      }

      .content {
        flex: 1 1 40rem;
        animation: fadeLeft .4s linear .4s backwards;

        span {
          color: $light-color;
          font-size: 2.5rem;
        }

        h3 {
          font-size: 6rem;
          color: $black;
          padding: .5rem 0;
        }
      }

      .image {
        flex: 1 1 40rem;
        margin: 3rem 0;

        img {
          width: 100%;
          animation: fadeUp .4s linear;
        }
      }
    }
  }

  #next-slide,
  #prev-slide {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 5rem;
    width: 5rem;
    line-height: 5rem;
    box-shadow: $box-shadow;
    text-align: center;
    background: $white;
    font-size: 3rem;
    color: $black;
    cursor: pointer;

    &:hover {
      background: $green;
      color: $white;
    }
  }

  #prev-slide {
    left: 2rem;
  }

  #next-slide {
    right: 2rem;
  }
}

.banner-container {
  @include grid(32rem);

  .banner {
    position: relative;
    height: 25rem;
    overflow: hidden;

    &:hover img {
      transform: scale(1.2);
    }

    img {
      height: 100%;
      width: 100%;
      object-fit: cover;
    }

    .content {
      position: absolute;
      top: 50%;
      left: 2rem;
      transform: translateY(-50%);

      span {
        color: $light-color;
        font-size: 1.5rem;
      }

      h3 {
        font-size: 2rem;
        padding-top: .5rem;
        color: $black;
      }

      .btn {
        padding: .8rem 2.5rem;
      }
    }
  }
}

.category .box-container {
  @include grid(16rem);
  padding: 4rem 0;

  .box {
    text-align: center;

    img {
      height: 15rem;
    }

    h3 {
      font-size: 2rem;
      margin: 1rem 0;
      color: $light-color;
    }

    &:hover h3 {
      color: $green;
    }
  }
}

.products .box-container {
  @include grid(25rem);

  .box {
    position: relative;
    background: $light-bg;
    text-align: center;
    overflow: hidden;

    &:hover .icons {
      top: 0;
    }

    .icons {
      position: absolute;
      top: -105%;
      left: 0;
      height: 30rem;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(243, 243, 243, .8);
      gap: 1rem;

      a {
        font-size: 2rem;
        height: 5rem;
        width: 5rem;
        line-height: 5rem;
        background: $white;
        box-shadow: $box-shadow;
        color: $light-color;

        &:hover {
          background: $green;
          color: $white;
        }
      }
    }

    .image {
      height: 30rem;
      width: 100%;
      overflow: hidden;

      img {
        height: 100%;
        width: 100%;
        object-fit: cover;
      }
    }

    .content {
      padding: 1.5rem;

      h3 {
        font-size: 2rem;
        color: $black;
      }

      .price {
        font-size: 2rem;
        color: $black;
        padding: 1rem 0;
      }

      .stars i {
        font-size: 1.7rem;
        color: $green;
      }
    }
  }
}

.about {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;

  .image {
    flex: 1 1 40rem;

    img {
      width: 100%;
    }
  }

  .content {
    flex: 1 1 40rem;

    span {
      color: $green;
      font-size: 2.5rem;
    }

    h3 {
      color: $black;
      font-size: 3rem;
      padding-top: .5rem;
    }

    p {
      color: $light-color;
      font-size: 1.4rem;
      line-height: 2;
      padding: 1rem 0;
    }
  }
}

.gallery .box-container {
  @include grid(30rem);

  .box {
    height: 25rem;
    overflow: hidden;
    position: relative;

    img {
      height: 100%;
      width: 100%;
      object-fit: cover;
    }

    &:hover img {
      transform: scale(1.2);
    }

    &:hover .icons {
      bottom: 0;
    }

    .icons {
      text-align: center;
      background: rgba(0, 0, 0, .7);
      padding: 1.5rem 0;
      position: absolute;
      bottom: -6rem;
      left: 0;
      right: 0;
      z-index: 10;

      a {
        font-size: 2.5rem;
        color: $white;
        margin: 0 1.5rem;

        &:hover {
          color: $green;
        }
      }
    }
  }
}

.info-container {
  @include grid(27rem);

  .info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;

    img {
      height: 7rem;
    }

    .content {

      h3 {
        font-size: 2rem;
        color: $black;
        padding-bottom: .5rem;
      }

      span {
        font-size: 1.5rem;
        color: $light-color;
      }
    }
  }
}

.review {
  @include grid(30rem);

  .box {
    padding: 2rem;
    border: $border;

    .user {
      display: flex;
      align-items: center;
      gap: 1.5rem;
      margin-bottom: 1.5rem;

      img {
        height: 7rem;
        width: 7rem;
        border-radius: 50%;
      }

      h3 {
        font-size: 2.2rem;
        color: $black;
      }

      span {
        font-size: 1.4rem;
        color: $green;
      }
    }

    p {
      font-size: 1.4rem;
      color: $light-color;
      line-height: 2;
    }
  }
}

.blogs .box-container {
  @include grid(30rem);

  .box {
    border: $border;

    &:hover .image img {
      transform: scale(1.2);
    }

    .image {
      height: 25rem;
      width: 100%;
      overflow: hidden;

      img {
        height: 100%;
        width: 100%;
        object-fit: cover;
      }
    }

    .content {
      padding: 2rem 1.5rem;

      .icons {
        border-bottom: $border;
        padding-bottom: 1.7rem;
        margin-bottom: 1.7rem;
        display: flex;
        align-items: center;
        justify-content: space-between;

        a {
          font-size: 1.4rem;
          color: $light-color;

          &:hover {
            color: $green;
          }

          i {
            color: $green;
            padding-right: .5rem;
          }
        }
      }

      h3 {
        font-size: 2.2rem;
        color: $black;
      }

      p {
        font-size: 1.4rem;
        color: $light-color;
        line-height: 2;
        padding: 1rem 0;
      }
    }
  }
}

.contact {

  .icons-container {
    @include grid(29rem);

    .icons {
      text-align: center;
      border: $border;
      padding: 2rem;

      i {
        height: 6rem;
        width: 6rem;
        line-height: 6rem;
        font-size: 2.5rem;
        background: $green;
        color: $white;
        border-radius: 50%;
      }

      h3 {
        color: $black;
        font-size: 2rem;
        padding: 1rem 0;
      }

      p {
        color: $light-color;
        font-size: 1.5rem;
        line-height: 2;
      }
    }
  }

  .row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;

    form {
      padding: 2rem;
      border: $border;
      flex: 1 1 40rem;

      h3 {
        font-size: 2.5rem;
        padding-bottom: 1rem;
        color: $black;
      }

      .inputBox {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;

        input {
          width: 49%;
        }
      }

      .inputBox .box,
      textarea {
        padding: 1rem 1.2rem;
        font-size: 1.6rem;
        border: $border;
        color: $black;
        text-transform: none;
        margin: .7rem 0;
      }

      textarea {
        width: 100%;
        height: 15rem;
        resize: none;
      }
    }

    .map {
      flex: 1 1 40rem;
      width: 100%;
    }
  }
}



























.footer {
  background: $light-bg;

  .box-container {
    @include grid(25rem);

    .box {

      h3 {
        font-size: 2.2rem;
        color: $black;
        padding: 1rem 0;
      }

      p {
        font-size: 1.5rem;
        color: $light-color;
        padding-bottom: .5rem;
      }

      a {
        font-size: 1.4rem;
        color: $light-color;
        padding: 1rem 0;
        display: block;

        &:hover {
          color: $green;

          i {
            padding-right: 2rem;
          }
        }

        i {
          padding-right: .5rem;
          color: $green;
        }
      }

      form input[type="email"] {
        width: 100%;
        padding: 1rem 1.2rem;
        font-size: 1.6rem;
        color: $black;
        margin: 1rem 0;
        text-transform: none;
      }

      .payment {
        width: 100%;
        margin-top: 2rem;
      }
    }
  }
}

.credit {
  text-align: center;
  background: $green;
  color: $white;
  font-size: 2rem;
  padding-bottom: 9rem;
}


// media queries 

@media (max-width:991px) {

  html {
    font-size: 55%;
  }

  .header {
    padding: 2rem;
  }

  section {
    padding: 3rem 2rem;
  }

  .home #next-slide,
  .home #prev-slide {
    transform: translateY(0);
    top: 88%;
  }

  .home #prev-slide {
    left: auto;
    right: 8rem;
  }

}

@media (max-width:768px) {

  #menu-btn {
    display: inline-block;
  }

  .header {

    .search-form {
      width: 100%;
      right: 0;
      border-radius: 0;

      &.active {
        top: 99%;
        border-top: $border;
        border-bottom: $border;
      }
    }

    .navbar {
      position: absolute;
      top: 99%;
      left: 0;
      right: 0;
      background: $white;
      border-top: $border;
      border-bottom: $border;
      clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);

      &.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
      }

      a {
        margin: 1.5rem;
        padding: 1.5rem;
        background: $light-bg;
        font-size: 2rem;
        display: block;
        border-radius: .5rem;
      }
    }
  }

}

@media (max-width:450px) {

  html {
    font-size: 50%;
  }

  .home .slides-container .slide .content h3 {
    font-size: 5rem;
  }

  .contact .row form .inputBox input {
    width: 100%;
  }

}